﻿using MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo.Interface;
using MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo.Visitor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo
{
    /// <summary>
    /// 学生类
    /// </summary>
    public abstract class Student
    {
        /// <summary>
        /// 学生Id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 学生姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 学习
        /// </summary>
        public void Study()
        {
            Console.WriteLine($"{Name}要学习了，不要打扰我。");
        }

        /// <summary>
        /// 抽象的获得视频
        /// </summary>
        public abstract void GetVideo();

        /// <summary>
        /// 访问者的获得视频
        /// </summary>
        public abstract void GetVideoVistor(IVisitor iVistorCurrent);

        /// <summary>
        /// 获得视频
        /// </summary>
        //public void GetVideo()
        //{
        //    if (this is StudentVip)
        //    {
        //        Console.WriteLine("免费获取全套的公开课视频代码合集。");
        //    }
        //    else if (this is StudentFree)
        //    {
        //        Console.WriteLine("只能获取当次课的公开课视频代码合集。");
        //    }
        //}
    }
}
